<template>
    <div class="hqda_table-page" style="text-align: right;margin-top: 10px;">
        <el-pagination 
        @current-change="handleCurrentChange" 
        :current-page="currentPage"
        :page-sizes="pageSizes" 
        :page-size="pageSize"
        layout="total, prev, pager, next"
        :total="total">
        </el-pagination>
    </div>
</template>
<script>

export default {
    props: {
        // 当前页
        currentPage: {
          type: Number,
          default: 1
        },
        pageSize: {
          type: Number,
          default: 10
        },
        pageSizes: {
          type: Array,
          default: () => {
            return [10, 20, 30, 50]
          }
        },

        total: {
            type: Number,
            default: 0
        }
    },
    
    computed: {
    },
    methods: {
        // 每页大小
        // handleSizeChange(val) {
        //   this.$emit('handlepageChange', val)
        // },
        // 翻页
        handleCurrentChange(val) {
            console.log(2222)
          this.$emit('handlepageChange', val, 'changePage')
        }

    }
}
</script>
